#include "xmppcore/initialstreamnegotiant.h"
#include "xmppcore/tlsstreamfeature.h"
#include "xmppcore/saslstreamfeature.h"

namespace yoohoo_xmppcore {

InitialStreamNegotiant::InitialStreamNegotiant(Connector* connector, QObject* parent) : Negotiant(connector, parent) {
	_streamFeatures = createStreamFeatures();
}

void InitialStreamNegotiant::negotiate() {
	Negotiant::negotiate();
}

StreamFeatures* InitialStreamNegotiant::createStreamFeatures() {
	StreamFeatures* streamFeatures = new StreamFeatures;
	streamFeatures->registerSupportedStreamFeature(new TlsStreamFeature);
	streamFeatures->registerSupportedStreamFeature(new SaslStreamFeature);

	return streamFeatures;
}

}
